package com.sun.stockexchangesimulate.service;

import com.sun.stockexchangesimulate.domain.Investor;
import com.baomidou.mybatisplus.extension.service.IService;

import java.math.BigDecimal;

/**
* @author sun
* @description 针对表【investor(股票投资者表)】的数据库操作Service
* @createDate 2024-10-23 14:54:34
*/
public interface InvestorService extends IService<Investor> {

    /**
     * 更新账户余额
     * @param investorId 买家账户
     * @param investorId1 卖家账户
     * @param sellPrice 卖出价格
     */
    void updateAccount(Integer investorId, Integer investorId1, BigDecimal sellPrice);

    /**
     * 更新投资者的可用资金
     * @param investorId -投资者id
     * @param amount -金额
     */
    void updateAvailableAmount(Integer investorId, BigDecimal amount);
}
